Browse Source

better button

pull/3/head landing-blocks_1.0.30
remorses 1 year ago
parent
commit
0d9bfae8d4
6 changed files with 21 additions and 16 deletions
  1. +6
    -4
      landing-blocks/src/Button.tsx
  2. +1
    -1
      landing-blocks/src/animations/utils.ts
  3. +3
    -1
      package.json
  4. +1
    -1
      website/package.json
  5. +1
    -0
      website/pages/_app.tsx
  6. +9
    -9
      yarn.lock

+ 6
- 4
landing-blocks/src/Button.tsx View File

@ -42,11 +42,13 @@ export const Button: FC = forwardRef(
}
return css``
}, [animate])
return (
<B
css={animationCss}
ref={ref}
as={props.href ? 'a' : 'button'}
transition='all 0.1s ease-in-out'
px='20px'
d='block'
width='auto'
@ -54,7 +56,7 @@ export const Button: FC = forwardRef(
bg={bg}
fontSize='text'
fontWeight='medium'
_hover={{ bg: color, color: bg as string }}
_hover={{ shadow: 'xl', transform: 'scale(1.1)' }}
{...props}
/>
)
@ -63,11 +65,11 @@ export const Button: FC = forwardRef(
function makeAnimationCss(keyframes) {
return css`
animation-duration: 5s;
animation-delay: 1s;
animation-duration: 0.6s;
/* animation-delay: 1s; */
animation-timing-function: ease-in-out;
animation-name: ${keyframes};
animation-direction: normal;
animation-iteration-count: infinite;
/* animation-iteration-count: infinite; */
`
}

+ 1
- 1
landing-blocks/src/animations/utils.ts View File

@ -20,7 +20,7 @@ export const compose = (...funcs: Array) => {
}
}
export function getNextPercentage(i, total, limit = 10) {
export function getNextPercentage(i, total, limit = 100) {
if (i == 0) {
return '0%'
}

+ 3
- 1
package.json View File

@ -4,5 +4,7 @@
"landing-blocks",
"website"
],
"scripts": {}
"scripts": {
"dev": "yarn --cwd website dev"
}
}

+ 1
- 1
website/package.json View File

@ -21,7 +21,7 @@
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"baby-i-am-faded": "^0.0.13",
"dokz": "^0.2.10",
"dokz": "^1.0.6",
"landing-blocks": "*",
"next": "^9.4.1",
"react": "^16.13.1",

+ 1
- 0
website/pages/_app.tsx View File

@ -13,6 +13,7 @@ export default function App(props) {
const { Component, pageProps } = props
return (
<DokzProvider
docsRootPath='pages/docs'
headerItems={[
headingNavLinks,
<GithubLink key='0' url='https://github.com/remorses/dokz' />,

+ 9
- 9
yarn.lock View File

@ -3290,10 +3290,10 @@ directory-tree@^2.2.4:
resolved "https://registry.yarnpkg.com/directory-tree/-/directory-tree-2.2.4.tgz#6d5bd7d82e48378e256a1e87b678a43c50076e2e"
integrity sha512-2N43msQptKbi3WMfIs+U09yi6bfyKL+MWyj5VMj8t1F/Tx04bt1cn/EEIU3o1JBltlJk7NQnzOEuTNa/KQvbWA==
dokz@^0.2.10:
version "0.2.10"
resolved "https://registry.yarnpkg.com/dokz/-/dokz-0.2.10.tgz#0df91285c16b6f00f33b39b9fd957becfd64cd52"
integrity sha512-ZQgMZn0Qun3gbqFI7bOK65LJ7XQabogA5aZ/0Yz5oPFXXhb8kIJH60/CSyYoUq1pESM/2qu17DOcfXtoJx620w==
dokz@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/dokz/-/dokz-1.0.6.tgz#c8d86e53ac397986b02463651cd13b9fe4027bc7"
integrity sha512-EdNMN2uB5PQhir2SCsA/T+g/gjZ8hW6hVLq2dOmIT0xYPCUSpjRr3gDeGeaotOYxYWJiURtO98lFYjWgpo3RrA==
dependencies:
"@emotion/styled" "^10.0.27"
"@mdx-js/loader" "^1.5.8"
@ -3311,7 +3311,7 @@ dokz@^0.2.10:
mdast "^3.0.0"
mdast-util-to-string "^1.1.0"
prism-react-renderer "^1.0.2"
re-resizable "^6.3.2"
re-resizable "^6.4.0"
react-frame-component "^4.1.1"
react-icons "^3.9.0"
react-live "^2.2.2"
@ -6384,10 +6384,10 @@ randomfill@^1.0.3:
randombytes "^2.0.5"
safe-buffer "^5.1.0"
re-resizable@^6.3.2:
version "6.3.2"
resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.3.2.tgz#27cc984af6ea5dbafd2b79f64c5224a6e1722fbe"
integrity sha512-ngxe4XBSb46vfwXjAwpURacVDig/pPt1kHRhcKlRRIoGICmo4aQHr725jurezepp1pm5jSC6iQhyLYfx3zOC3w==
re-resizable@^6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.4.0.tgz#4c862f021a913ec519bb053c34af45559e8c1b26"
integrity sha512-E8WOtM8RfcGv4kOdasdR10jw8IU45j5jVift/rSA6AZMnaBRxJdt6YAkPHFv/04vsMNNvNu3G8vlyNOsVwqPpA==
dependencies:
fast-memoize "^2.5.1"

Loading…
Cancel
Save