Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(theme): input selected color #3670

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const useStyles = () => {
})
const colors = {
placeholder: color.gray_600,
focused: color.gray_600,
focused: color.input_selected,
blur: color.gray_900,
}
return {styles, colors} as const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const useStyles = () => {
})
const colors = {
black: color.gray_max,
selected: color.text_gray_medium,
selected: color.input_selected,
}
return {styles, colors} as const
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ const MnemonicWordInput = React.forwardRef<MnemonicWordInputRef, MnemonicWordInp
}}
onBlur={handleOnBlur}
cursorColor={colors.primary_600} // only works for android
selectionColor={Platform.OS === 'android' ? colors.gray_100 : undefined} // on ios, selectionColor changes cursor and selection
selectionColor={Platform.OS === 'android' ? colors.input_selected : undefined} // on ios, selectionColor changes cursor and selection
keyboardType={Platform.OS === 'android' ? 'visible-password' : undefined} // to hide keyboard suggestions on android
keyboardAppearance={isDark ? 'dark' : 'light'} // ios feature
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const useStyles = () => {

const colors = {
placeholder: color.gray_600,
focused: color.gray_900,
focused: color.input_selected,
blur: color.black_static,
noSelected: color.gray_400,
gray: color.gray_max,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const useStyles = () => {
},
})
const colors = {
cursor: color.text_gray_medium,
cursor: color.input_selected,
}
return {styles, colors} as const
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const useStyles = () => {

const colors = {
background: color.gray_100,
cursor: color.text_gray_medium,
cursor: color.input_selected,
}

return {styles, colors}
Expand Down
2 changes: 2 additions & 0 deletions packages/theme/src/themed-palettes/black.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const black: ThemedPalette = {
el_gray_min: darkPalette.gray_400, // input stroke, disabled state for most components
el_secondary: darkPalette.secondary_600, // success state

input_selected: `${darkPalette.primary_200}${opacity._80}`,

mobile_overlay: `${darkPalette.black_static}${opacity._64}`, // mobile bottom sheet overlay
mobile_bg_blur: `${darkPalette.gray_50}${opacity._80}`, // mobile bottom sheet background

Expand Down
2 changes: 2 additions & 0 deletions packages/theme/src/themed-palettes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const light: ThemedPalette = {
el_gray_min: lightPalette.gray_400, // icons, shapes, lines in buttons, chips, tabs, checkboxes, readio, switch
el_secondary: lightPalette.secondary_400, // success state

input_selected: `${lightPalette.primary_200}${opacity._80}`,

mobile_overlay: `${lightPalette.black_static}${opacity._40}`, // mobile bottom sheet overlay
mobile_bg_blur: `${lightPalette.white_static}${opacity._80}`, // mobile bottom sheet background

Expand Down
2 changes: 2 additions & 0 deletions packages/theme/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export type ThemedPalette = BasePalette & {
el_gray_min: HexColor
el_secondary: HexColor

input_selected: HexColor

web_overlay: HexColor
web_bg_sidebar_active: HexColor
web_bg_sidebar_inactive: HexColor
Expand Down
Loading