mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-31 09:08:41 +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
29 lines
606 B
TypeScript
29 lines
606 B
TypeScript
import React from 'react'
|
|
import Loading from '../loading'
|
|
|
|
interface Props {
|
|
color: string
|
|
}
|
|
|
|
const ButtonLoading: React.FC<React.PropsWithChildren<Props>> = ({ color }) => {
|
|
return (
|
|
<div className="btn-loading">
|
|
<Loading color={color} />
|
|
<style jsx>{`
|
|
.btn-loading {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 2;
|
|
background-color: var(--geist-ui-button-bg);
|
|
}
|
|
`}</style>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
ButtonLoading.displayName = 'GeistButtonLoading'
|
|
export default ButtonLoading
|