|
1 | | -import React from 'react'; |
2 | | -import styled, { css } from 'styled-components'; |
| 1 | +import React, { ComponentProps } from 'react'; |
3 | 2 | import { Link } from 'react-router-dom'; |
4 | | -import { Button as ReakitButton } from 'reakit/Button'; |
| 3 | +import { Button as ReakitButtonBase } from 'reakit/Button'; |
| 4 | +import styled, { css } from 'styled-components'; |
| 5 | + |
5 | 6 | import theme from '../../theme'; |
6 | | -import { IButtonProps } from '.'; |
7 | 7 | import { withoutProps } from '../../utils'; |
8 | 8 |
|
| 9 | +import { Button } from '.'; |
| 10 | + |
9 | 11 | export type OptionProps = { |
10 | 12 | theme: any; |
11 | 13 | disabled?: boolean; |
@@ -102,7 +104,7 @@ const getBorder = ({ |
102 | 104 | return '2px solid #66B9F4'; |
103 | 105 | }; |
104 | 106 |
|
105 | | -export const styles = css<IButtonProps | any>` |
| 107 | +export const styles = css<ComponentProps<typeof Button> | any>` |
106 | 108 | transition: 0.3s ease all; |
107 | 109 | font-family: Poppins, Roboto, sans-serif; |
108 | 110 |
|
@@ -160,6 +162,6 @@ export const LinkButton = styled(withoutProps(`small`)(Link))` |
160 | 162 | export const AButton = styled(withoutProps(`small`)(props => <a {...props} />))` |
161 | 163 | ${styles}; |
162 | 164 | `; |
163 | | -export const Button = styled(withoutProps(`small`)(ReakitButton))` |
| 165 | +export const ReakitButton = styled(withoutProps(`small`)(ReakitButtonBase))` |
164 | 166 | ${styles} |
165 | 167 | `; |
0 commit comments