Skip to content

Commit f7cded8

Browse files
committed
refactor: update UI styling
1 parent 5e49dda commit f7cded8

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

src/ui/button.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ const button = tv({
1414
variants: {
1515
variant: {
1616
default: {
17-
container: 'bg-black',
18-
label: 'text-white',
17+
container: 'bg-black dark:bg-white',
18+
label: 'text-white dark:text-black',
19+
indicator: 'text-white dark:text-black',
1920
},
2021
secondary: {
2122
container: 'bg-primary-600',
@@ -25,7 +26,7 @@ const button = tv({
2526
outline: {
2627
container: 'border border-neutral-400',
2728
label: 'text-black dark:text-neutral-100',
28-
indicator: 'text-black',
29+
indicator: 'text-black dark:text-neutral-100',
2930
},
3031
destructive: {
3132
container: 'bg-red-600',
@@ -34,8 +35,8 @@ const button = tv({
3435
},
3536
ghost: {
3637
container: 'bg-transparent',
37-
label: 'text-black underline',
38-
indicator: 'text-black',
38+
label: 'text-black underline dark:text-white',
39+
indicator: 'text-black dark:text-white',
3940
},
4041
link: {
4142
container: 'bg-transparent',
@@ -61,9 +62,9 @@ const button = tv({
6162
},
6263
disabled: {
6364
true: {
64-
container: 'bg-neutral-300',
65-
label: 'text-neutral-600',
66-
indicator: 'text-neutral-400',
65+
container: 'bg-neutral-300 dark:bg-neutral-300',
66+
label: 'text-neutral-600 dark:text-neutral-600',
67+
indicator: 'text-neutral-400 dark:text-neutral-400',
6768
},
6869
},
6970
fullWidth: {

src/ui/input.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ const inputTv = tv({
1919
container: 'mb-2',
2020
label: 'text-grey-100 dark:text-neutral-100 text-lg mb-1',
2121
input:
22-
'mt-0 border-[0.5px] font-jakarta text-base leading-5 font-[500] px-4 py-3 rounded-xl bg-neutral-100 border-neutral-300 ',
22+
'mt-0 border-[0.5px] font-jakarta text-base leading-5 font-[500] px-4 py-3 rounded-xl bg-neutral-100 border-neutral-300 dark:border-neutral-700 dark:bg-neutral-800 dark:text-white',
2323
},
2424

2525
variants: {
2626
focused: {
2727
true: {
28-
input: 'border-neutral-400',
28+
input: 'border-neutral-400 dark:border-neutral-300',
2929
},
3030
},
3131
error: {

src/ui/modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const Modal = React.forwardRef(
8787
const renderHandleComponent = React.useCallback(
8888
() => (
8989
<>
90-
<View className="mb-6 mt-2 h-1 w-12 self-center rounded-lg bg-gray-400 dark:bg-gray-700" />
90+
<View className="mb-8 mt-2 h-1 w-12 self-center rounded-lg bg-gray-400 dark:bg-gray-700" />
9191
<ModalHeader title={title} dismiss={modal.dismiss} />
9292
</>
9393
),
@@ -184,7 +184,7 @@ const CloseButton = ({ close }: { close: () => void }) => {
184184
accessibilityHint="closes the modal"
185185
>
186186
<Svg
187-
className="fill-neutral-100 dark:fill-white"
187+
className="fill-neutral-300 dark:fill-white"
188188
width={24}
189189
height={24}
190190
fill="none"

src/ui/select.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const selectTv = tv({
2727
container: 'mb-4',
2828
label: 'text-grey-100 dark:text-neutral-100 text-lg mb-1',
2929
input:
30-
'mt-0 flex-row items-center justify-center border-[0.5px] border-grey-50 px-3 py-3 rounded-xl',
30+
'mt-0 flex-row items-center justify-center border-[0.5px] border-grey-50 px-3 py-3 rounded-xl dark:bg-neutral-800 dark:border-neutral-500',
3131
inputValue: 'dark:text-neutral-100',
3232
},
3333

@@ -127,7 +127,7 @@ const Option = React.memo(
127127
{...props}
128128
>
129129
<Text className="flex-1 dark:text-neutral-100 ">{label}</Text>
130-
{selected && <Check fill="#000" />}
130+
{selected && <Check />}
131131
</Pressable>
132132
);
133133
}
@@ -250,11 +250,17 @@ export function ControlledSelect<T extends FieldValues>(
250250
);
251251
}
252252

253-
const Check = ({ fill = '#000', ...props }: SvgProps) => (
254-
<Svg width={25} height={24} fill="none" viewBox="0 0 25 24" {...props}>
253+
const Check = ({ ...props }: SvgProps) => (
254+
<Svg
255+
width={25}
256+
height={24}
257+
fill="none"
258+
viewBox="0 0 25 24"
259+
{...props}
260+
className="stroke-black dark:stroke-white"
261+
>
255262
<Path
256263
d="m20.256 6.75-10.5 10.5L4.506 12"
257-
stroke={fill}
258264
strokeWidth={2.438}
259265
strokeLinecap="round"
260266
strokeLinejoin="round"

0 commit comments

Comments
 (0)