Skip to content

Commit a231c1a

Browse files
authored
fix: styles for <AlertBanner /> (#5579)
* feat: add new story for LoginPageView * fix: update <AlertBanner /> styles - align text to the left - add padding to the top of span inside * fixup: formatting
1 parent c51b5a0 commit a231c1a

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

site/src/components/AlertBanner/AlertBanner.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
9696
borderRadius: theme.shape.borderRadius,
9797
padding: `${theme.spacing(1)}px ${theme.spacing(2)}px`,
9898
backgroundColor: `${colors.gray[16]}`,
99+
textAlign: "left",
100+
101+
"& span": {
102+
paddingTop: `${theme.spacing(0.25)}px`,
103+
},
99104

100105
// targeting the alert icon rather than the expander icon
101106
"& svg:nth-child(2)": {

site/src/pages/LoginPage/LoginPageView.stories.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,16 @@ Example.args = {
1717
onSignIn: action("onSignIn"),
1818
context: {},
1919
}
20+
21+
const err = new Error(
22+
"You are signed out or your session has expired. Please sign in again to continue.",
23+
)
24+
25+
export const AuthError = Template.bind({})
26+
AuthError.args = {
27+
isLoading: false,
28+
onSignIn: action("onSignIn"),
29+
context: {
30+
authError: err,
31+
},
32+
}

0 commit comments

Comments
 (0)