Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Commit a8f9395

Browse files
authored
feat: Message styling changes (#227)
1 parent 6337858 commit a8f9395

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

.changeset/empty-shrimps-battle.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@supabase/auth-ui-shared': patch
3+
'@supabase/auth-ui-react': patch
4+
---
5+
6+
Message styling change

packages/react/src/components/UI/Message.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ import { Appearance } from '../../types'
44

55
const messageDefaultStyles = css({
66
fontFamily: '$bodyFontFamily',
7-
fontSize: '$baseBodySize',
7+
fontSize: '$baseInputSize',
88
marginBottom: '$labelBottomMargin',
99
display: 'block',
1010
textAlign: 'center',
11+
borderRadius: '0.375rem',
12+
padding: '1.5rem 1rem',
13+
lineHeight: '1rem',
14+
color: '$messageText',
15+
backgroundColor: '$messageBackground',
16+
border: '1px solid $messageBorder',
1117
variants: {
1218
color: {
13-
default: {
14-
color: '$messageText',
15-
},
1619
danger: {
1720
color: '$messageTextDanger',
21+
backgroundColor: '$messageBackgroundDanger',
22+
border: '1px solid $messageBorderDanger',
1823
},
1924
},
2025
},
2126
})
2227

2328
interface MessageProps extends React.HTMLAttributes<HTMLSpanElement> {
2429
children: React.ReactNode
25-
color?: 'default' | 'danger'
30+
color?: 'danger'
2631
appearance?: Appearance
2732
}
2833

packages/shared/src/theming/Types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export type ThemeVariables = {
1616
inputPlaceholder?: string
1717
inputText?: string
1818
messageText?: string
19+
messageBackground?: string
20+
messageBorder?: string
1921
messageTextDanger?: string
22+
messageBackgroundDanger?: string
23+
messageBorderDanger?: string
2024
anchorTextColor?: string
2125
anchorTextHoverColor?: string
2226
}

packages/shared/src/theming/defaultThemes.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ export const ThemeSupa: Theme = {
3131
inputText: 'black',
3232
inputLabelText: 'gray',
3333
inputPlaceholder: 'darkgray',
34-
messageText: 'gray',
35-
messageTextDanger: 'red',
34+
messageText: '#2b805a',
35+
messageBackground: '#e7fcf1',
36+
messageBorder: '#d0f3e1',
37+
messageTextDanger: '#ff6369',
38+
messageBackgroundDanger: '#fff8f8',
39+
messageBorderDanger: '#822025',
3640
anchorTextColor: 'gray',
3741
anchorTextHoverColor: 'darkgray',
3842
},
@@ -91,6 +95,10 @@ export const ThemeSupa: Theme = {
9195
inputBorderFocus: 'gray',
9296
inputText: 'white',
9397
inputPlaceholder: 'darkgray',
98+
messageText: '#85e0b7',
99+
messageBackground: '#072719',
100+
messageBorder: '#2b805a',
101+
messageBackgroundDanger: '#1f1315',
94102
},
95103
},
96104
}
@@ -109,6 +117,12 @@ export const ThemeMinimal: Theme = {
109117
inputBorder: 'lightgray',
110118
inputText: 'black',
111119
inputPlaceholder: 'darkgray',
120+
messageText: '#2b805a',
121+
messageBackground: '#e7fcf1',
122+
messageBorder: '#d0f3e1',
123+
messageTextDanger: '#ff6369',
124+
messageBackgroundDanger: '#fff8f8',
125+
messageBorderDanger: '#822025',
112126
},
113127
space: {
114128
spaceSmall: '4px',
@@ -150,6 +164,10 @@ export const ThemeMinimal: Theme = {
150164
inputBorder: 'gray',
151165
inputText: 'black',
152166
inputPlaceholder: 'darkgray',
167+
messageText: '#85e0b7',
168+
messageBackground: '#072719',
169+
messageBorder: '#2b805a',
170+
messageBackgroundDanger: '#1f1315',
153171
},
154172
},
155173
}

0 commit comments

Comments
 (0)