Skip to content

Commit d0ce4c1

Browse files
committed
change button style
1 parent 44d34f3 commit d0ce4c1

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/components/Admonition.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {createContext, useContext} from 'react'
22
import {type StyleProp, View, type ViewStyle} from 'react-native'
33

4-
import {atoms as a, useTheme} from '#/alf'
4+
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
55
import {Button as BaseButton, type ButtonProps} from '#/components/Button'
66
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
77
import {CircleX_Stroke2_Corner0_Rounded as CircleXIcon} from '#/components/icons/CircleX'
@@ -71,9 +71,9 @@ export function Text({
7171
export function Button({
7272
children,
7373
...props
74-
}: Omit<ButtonProps, 'size' | 'variant' | 'color'>) {
74+
}: Omit<ButtonProps, 'size' | 'variant'>) {
7575
return (
76-
<BaseButton size="tiny" variant="outline" color="secondary" {...props}>
76+
<BaseButton size="tiny" {...props}>
7777
{children}
7878
</BaseButton>
7979
)
@@ -103,6 +103,7 @@ export function Outer({
103103
style?: StyleProp<ViewStyle>
104104
}) {
105105
const t = useTheme()
106+
const {gtMobile} = useBreakpoints()
106107
const borderColor = {
107108
info: t.atoms.border_contrast_high.borderColor,
108109
tip: t.palette.primary_500,
@@ -113,6 +114,7 @@ export function Outer({
113114
<Context.Provider value={{type}}>
114115
<View
115116
style={[
117+
gtMobile ? a.p_md : a.p_sm,
116118
a.p_md,
117119
a.rounded_sm,
118120
a.border,

src/components/moderation/ReportDialog/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ function Inner(props: ReportDialogProps) {
225225
</Admonition.Text>
226226
</Admonition.Content>
227227
<Admonition.Button
228+
color="negative_subtle"
228229
label={_(msg`Retry loading report options`)}
229230
onPress={() => refetchLabelers()}>
230231
<ButtonText>

src/view/screens/Storybook/Admonitions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function Admonitions() {
5656
</AdmonitionText>
5757
</AdmonitionContent>
5858
<AdmonitionButton
59+
color="negative_subtle"
5960
label={_(msg`Retry loading report options`)}
6061
onPress={() => {}}>
6162
<ButtonText>

0 commit comments

Comments
 (0)