mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-30 22:48:09 +08:00
* feat(scaleable): add scaleable props to each component * chore(scaleable): update the exported type * feat: apply scaleable to components chore: remove with-default test: improve testcase for scaleable chore: resolve test warning ci: upgrade nodejs to latest lts docs: fix type error in document site * docs: update documents to be compatible with scaleable chore: fix build errors * chore: remove all size-related attributes docs: improve guide document * docs: add scaleable documentation test: update snapshots chore: remove unused * feat: add scaleable to grid components * docs: improve docs * test: update snapshots * fix(grid): fix basic component props
40 lines
898 B
TypeScript
40 lines
898 B
TypeScript
import React from 'react'
|
|
import useTheme from '../use-theme'
|
|
|
|
export interface InputBlockLabelLabel {}
|
|
|
|
const InputBlockLabelComponent: React.FC<
|
|
React.PropsWithChildren<InputBlockLabelLabel>
|
|
> = ({ children }) => {
|
|
const theme = useTheme()
|
|
|
|
return (
|
|
<label>
|
|
{children}
|
|
<style jsx>{`
|
|
label {
|
|
display: block;
|
|
font-weight: normal;
|
|
color: ${theme.palette.accents_6};
|
|
padding: 0 0 0 1px;
|
|
margin-bottom: 0.5em;
|
|
font-size: 1em;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
label > :global(*:first-child) {
|
|
margin-top: 0;
|
|
}
|
|
|
|
label > :global(*:last-child) {
|
|
margin-bottom: 0;
|
|
}
|
|
`}</style>
|
|
</label>
|
|
)
|
|
}
|
|
|
|
InputBlockLabelComponent.displayName = 'GeistInputBlockLabel'
|
|
const InputBlockLabel = React.memo(InputBlockLabelComponent)
|
|
export default InputBlockLabel
|