mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Fix form tab (#4066)
This commit is contained in:
@@ -18,7 +18,9 @@ const useStyles = makeStyles((theme) => ({
|
||||
footer: {
|
||||
display: "flex",
|
||||
flex: "0",
|
||||
flexDirection: "row",
|
||||
// The first button is the submit so it is the first element to be focused
|
||||
// on tab so we use row-reverse to display it on the right
|
||||
flexDirection: "row-reverse",
|
||||
gap: theme.spacing(1.5),
|
||||
alignItems: "center",
|
||||
marginTop: theme.spacing(3),
|
||||
@@ -36,10 +38,8 @@ export const FormFooter: FC<React.PropsWithChildren<FormFooterProps>> = ({
|
||||
const styles = useStyles()
|
||||
return (
|
||||
<div className={styles.footer}>
|
||||
<Button type="button" className={styles.button} onClick={onCancel} variant="outlined">
|
||||
{Language.cancelLabel}
|
||||
</Button>
|
||||
<LoadingButton
|
||||
tabIndex={0}
|
||||
loading={isLoading}
|
||||
className={styles.button}
|
||||
variant="contained"
|
||||
@@ -48,6 +48,15 @@ export const FormFooter: FC<React.PropsWithChildren<FormFooterProps>> = ({
|
||||
>
|
||||
{submitLabel}
|
||||
</LoadingButton>
|
||||
<Button
|
||||
type="button"
|
||||
className={styles.button}
|
||||
onClick={onCancel}
|
||||
variant="outlined"
|
||||
tabIndex={0}
|
||||
>
|
||||
{Language.cancelLabel}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ export const darkPalette: PaletteOptions = {
|
||||
type: "dark",
|
||||
primary: {
|
||||
main: colors.blue[7],
|
||||
contrastText: colors.gray[4],
|
||||
contrastText: colors.blue[1],
|
||||
light: colors.blue[6],
|
||||
dark: colors.blue[9],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user