Skip to content

Commit

Permalink
Fix: Added new styles to input group
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohernandez committed Jul 2, 2024
1 parent b9f0f24 commit 14a7e36
Showing 1 changed file with 13 additions and 27 deletions.
40 changes: 13 additions & 27 deletions src/renderer/modules/KeysTabs/DelayTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ import { Button } from "@Renderer/components/atoms/Button";
import Heading from "@Renderer/components/atoms/Heading";

const Styles = Styled.div`
display: flex;
flex-wrap: wrap;
height: inherit;
h4 {
font-size: 16px;
flex: 0 0 100%;
width: 100%;
}
.description {
margin-top: 8px;
font-size: 14px;
color: ${({ theme }) => theme.styles.macro.descriptionColor};
flex: 0 0 100%;
width: 100%;
}
.form-control {
color: ${({ theme }) => theme.styles.form.inputColor};
background: ${({ theme }) => theme.styles.form.inputBackgroundColor};
Expand All @@ -39,7 +24,6 @@ h4 {
margin-bottom: 0;
}
.input-group {
max-width: 280px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
.input-group-text {
Expand All @@ -66,10 +50,9 @@ h4 {
text-align: right;
}
.inputGroupRandom {
position: relative;
.inputIcon {
position: absolute;
top: 33%;
top: 50%;
left: 95px;
transform: translate3d(0, -50%, 0);
width: 32px;
Expand Down Expand Up @@ -174,9 +157,9 @@ class DelayTab extends React.Component<DelayTabProps, DelayTabState> {
render() {
const { fixedSelected, fixedValue, randomValue } = this.state;
return (
<Styles>
<Styles className="flex flex-wrap h-[inherit]">
<div className="tabContentWrapper">
<Heading renderAs="h4" headingLevel={4}>
<Heading renderAs="h4" headingLevel={4} className="flex w-full">
{i18n.editor.macros.delayTabs.title}
</Heading>
<div className="formWrapper">
Expand Down Expand Up @@ -206,7 +189,7 @@ class DelayTab extends React.Component<DelayTabProps, DelayTabState> {
<div className="inputsWrapper mt-3">
{fixedSelected ? (
<div className="inputGroupFixed">
<div className="input-group max-w-72 relative flex flex-wrap w-full items-stretch">
<div className="input-group max-w-full relative flex flex-wrap w-full items-stretch">
<input
placeholder={i18n.editor.macros.delayTabs.title}
min={0}
Expand All @@ -222,13 +205,16 @@ class DelayTab extends React.Component<DelayTabProps, DelayTabState> {
ms
</div>
</div>
<p className="description">{i18n.editor.macros.delayTabs.minMaxDescription}</p>

<p className="description mt-2 text-sm w-full text-gray-400 dark:text-gray-200">
{i18n.editor.macros.delayTabs.minMaxDescription}
</p>
</div>
) : (
<div className="inputGroupRandom">
<div className="input-group max-w-72 relative flex flex-wrap w-full items-stretch">
<div className="inputGroupRandom relative">
<div className="input-group max-w-full relative flex flex-wrap w-full items-stretch">
<input
className="inputMin form-control"
className="inputMin form-control w-[120px]"
placeholder="Min."
min={0}
type="number"
Expand All @@ -238,7 +224,7 @@ class DelayTab extends React.Component<DelayTabProps, DelayTabState> {
value={randomValue.min}
/>
<input
className="inputMax form-control"
className="inputMax form-control w-[120px]"
placeholder="Max"
min={1}
type="number"
Expand All @@ -251,7 +237,7 @@ class DelayTab extends React.Component<DelayTabProps, DelayTabState> {
ms
</div>
</div>
<div className="inputIcon">
<div className="inputIcon absolute top-1/2 left-1/2 rounded w-8 h-8 p-1 z-10 bg-gray-25 dark:bg-gray-800/20 transform translate-x-[-50%] before:translate-y-[-50%]">
<IconMediaShuffle />
</div>
<p className="description">{i18n.editor.macros.delayTabs.minMaxDescription}</p>
Expand Down

0 comments on commit 14a7e36

Please sign in to comment.