Skip to content

Commit

Permalink
Merge pull request #20 from uninus-opensource/improvement/inputs-styl…
Browse files Browse the repository at this point in the history
…e-color

refactor : change color style on input
  • Loading branch information
maulanasdqn authored Mar 19, 2024
2 parents fd3d28a + d4d6fad commit 5e72d00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions libs/entities/src/types/common/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ export const className = ({
{
'bg-white border border-neutral-60% focus-within:border-neutral-100% text-neutral-100% placeholder:text-neutral-50%':
status === 'default' || !status,
'bg-green-10% text-green placeholder:text-green': status === 'success',
'bg-primary-10% border-primary text-primary placeholder:text-primary-40%':
status === 'success',
'bg-red-10% text-red placeholder:text-red': status === 'error',
'bg-yellow-10% text-yellow-60% placeholder:text-yellow-60%':
'bg-secondary-10% border-secondary text-secondary-60% placeholder:text-secondary-40%':
status === 'warning',
}
);
12 changes: 6 additions & 6 deletions libs/web/components/atoms/src/inputs/text/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export const InputText: FC<TInput> = ({
{
'text-neutral-60% focus-within:text-neutral-100%':
status === 'default' || !status,
'bg-green-10% text-green placeholder:text-green':
'bg-primary-10% text-primary placeholder:text-primary':
status === 'success',
'bg-red-10% text-red placeholder:text-red': status === 'error',
'bg-yellow-10% text-yellow-60% placeholder:text-yellow-60%':
'bg-secondary-10% text-secondary-60% placeholder:text-secondary-60%':
status === 'warning',
},
{
Expand Down Expand Up @@ -63,10 +63,10 @@ export const InputText: FC<TInput> = ({
{
'text-neutral-60% focus-within:text-neutral-100%':
status === 'default' || !status,
'bg-green-10% text-green placeholder:text-green':
'bg-primary-10% text-primary placeholder:text-primary':
status === 'success',
'bg-red-10% text-red placeholder:text-red': status === 'error',
'bg-yellow-10% text-yellow-60% placeholder:text-yellow-60%':
'bg-secondary-10% text-secondary-60% placeholder:text-secondary-60%':
status === 'warning',
},
{
Expand Down Expand Up @@ -98,10 +98,10 @@ export const InputText: FC<TInput> = ({
{
'text-neutral-60% focus-within:text-neutral-100%':
status === 'default' || !status,
'bg-green-10% text-green placeholder:text-green':
'bg-primary-10% text-primary placeholder:text-primary':
status === 'success',
'bg-red-10% text-red placeholder:text-red': status === 'error',
'bg-yellow-10% text-yellow-60% placeholder:text-yellow-60%':
'bg-secondary-40% text-secondary-60% placeholder:text-secondary-60%':
status === 'warning',
},
{
Expand Down
4 changes: 2 additions & 2 deletions libs/web/components/atoms/src/message/message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export const Message: FC<TMessage> = (props): ReactElement => {
'text-xs flex items-center pt-1 gap-x-1 mt-[-7px]',
{
'text-red': status === 'error',
'text-green': status === 'success',
'text-primary': status === 'success',
'text-grey': status === 'default',
'text-yellow-60%': status === 'warning',
'text-secondary-60%': status === 'warning',
},
props.className
);
Expand Down

0 comments on commit 5e72d00

Please sign in to comment.