mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-29 04:35:32 +08:00
chore: migrate to geist ui
This commit is contained in:
@@ -29,16 +29,16 @@ exports[`ButtonGroup buttons should be displayed vertically 1`] = `
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
box-shadow: none;
|
||||
--zeit-ui-button-padding: 1.25rem;
|
||||
--zeit-ui-button-height: 2.5rem;
|
||||
--zeit-ui-button-color: #666;
|
||||
--zeit-ui-button-bg: #fff;
|
||||
--geist-ui-button-padding: 1.25rem;
|
||||
--geist-ui-button-height: 2.5rem;
|
||||
--geist-ui-button-color: #666;
|
||||
--geist-ui-button-bg: #fff;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #000;
|
||||
--zeit-ui-button-color: #000;
|
||||
--geist-ui-button-color: #000;
|
||||
background-color: #fff;
|
||||
border-color: #000;
|
||||
cursor: pointer;
|
||||
@@ -91,16 +91,16 @@ exports[`ButtonGroup buttons should be displayed vertically 1`] = `
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
box-shadow: none;
|
||||
--zeit-ui-button-padding: 1.25rem;
|
||||
--zeit-ui-button-height: 2.5rem;
|
||||
--zeit-ui-button-color: #666;
|
||||
--zeit-ui-button-bg: #fff;
|
||||
--geist-ui-button-padding: 1.25rem;
|
||||
--geist-ui-button-height: 2.5rem;
|
||||
--geist-ui-button-color: #666;
|
||||
--geist-ui-button-bg: #fff;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #000;
|
||||
--zeit-ui-button-color: #000;
|
||||
--geist-ui-button-color: #000;
|
||||
background-color: #fff;
|
||||
border-color: #000;
|
||||
cursor: pointer;
|
||||
@@ -201,16 +201,16 @@ exports[`ButtonGroup props should be passed to each button 1`] = `
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
box-shadow: none;
|
||||
--zeit-ui-button-padding: 0.625rem;
|
||||
--zeit-ui-button-height: 1.5rem;
|
||||
--zeit-ui-button-color: #fff;
|
||||
--zeit-ui-button-bg: #0070f3;
|
||||
--geist-ui-button-padding: 0.625rem;
|
||||
--geist-ui-button-height: 1.5rem;
|
||||
--geist-ui-button-color: #fff;
|
||||
--geist-ui-button-bg: #0070f3;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #0070f3;
|
||||
--zeit-ui-button-color: #0070f3;
|
||||
--geist-ui-button-color: #0070f3;
|
||||
background-color: #fff;
|
||||
border-color: #0070f3;
|
||||
cursor: pointer;
|
||||
@@ -311,16 +311,16 @@ exports[`ButtonGroup props should be passed to each button 2`] = `
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
box-shadow: none;
|
||||
--zeit-ui-button-padding: 0.625rem;
|
||||
--zeit-ui-button-height: 1.5rem;
|
||||
--zeit-ui-button-color: #fff;
|
||||
--zeit-ui-button-bg: #0070f3;
|
||||
--geist-ui-button-padding: 0.625rem;
|
||||
--geist-ui-button-height: 1.5rem;
|
||||
--geist-ui-button-color: #fff;
|
||||
--geist-ui-button-bg: #0070f3;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #0070f3;
|
||||
--zeit-ui-button-color: #0070f3;
|
||||
--geist-ui-button-color: #0070f3;
|
||||
background-color: #fff;
|
||||
border-color: #0070f3;
|
||||
cursor: pointer;
|
||||
@@ -421,16 +421,16 @@ exports[`ButtonGroup should render correctly 1`] = `
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
box-shadow: none;
|
||||
--zeit-ui-button-padding: 1.25rem;
|
||||
--zeit-ui-button-height: 2.5rem;
|
||||
--zeit-ui-button-color: #666;
|
||||
--zeit-ui-button-bg: #fff;
|
||||
--geist-ui-button-padding: 1.25rem;
|
||||
--geist-ui-button-height: 2.5rem;
|
||||
--geist-ui-button-color: #666;
|
||||
--geist-ui-button-bg: #fff;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
color: #000;
|
||||
--zeit-ui-button-color: #000;
|
||||
--geist-ui-button-color: #000;
|
||||
background-color: #fff;
|
||||
border-color: #000;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -3,7 +3,7 @@ import useTheme from '../styles/use-theme'
|
||||
import withDefaults from '../utils/with-defaults'
|
||||
import { NormalSizes, ButtonTypes } from '../utils/prop-types'
|
||||
import { ButtonGroupContext, ButtonGroupConfig } from './button-group-context'
|
||||
import { ZeitUIThemesPalette } from 'components/styles/themes'
|
||||
import { GeistUIThemesPalette } from 'components/styles/themes'
|
||||
|
||||
interface Props {
|
||||
disabled?: boolean
|
||||
@@ -26,7 +26,7 @@ const defaultProps = {
|
||||
type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>
|
||||
export type ButtonGroupProps = Props & typeof defaultProps & NativeAttrs
|
||||
|
||||
const getGroupBorderColors = (palette: ZeitUIThemesPalette, props: ButtonGroupProps): string => {
|
||||
const getGroupBorderColors = (palette: GeistUIThemesPalette, props: ButtonGroupProps): string => {
|
||||
const { ghost, type } = props
|
||||
if (!ghost && type !== 'default') return palette.background
|
||||
const colors: { [key in ButtonTypes]?: string } = {
|
||||
|
||||
Reference in New Issue
Block a user