styles: button ghost

This commit is contained in:
lytrankieio123
2021-08-24 13:04:29 +07:00
parent ec7f3b5882
commit c05cca78ba
6 changed files with 24 additions and 41 deletions

View File

@@ -1,21 +1,7 @@
import { useEffect, useRef } from 'react';
import { Inputcommon, Layout } from 'src/components/common'
import { InputType } from 'src/utils/constanst.utils'
import { ButtonCommon, Inputcommon, Layout } from 'src/components/common';
import { IconBuy } from 'src/components/icons';
export default function Home() {
const inputElementRef = useRef<HTMLInputElement>(null);
useEffect(() => {
setTimeout(() =>{
inputElementRef.current?.focus()
}, 1000)
}, [])
const onEnter = (value: string | number) => {
}
return (
<>
<div>This is home page</div>
@@ -23,9 +9,11 @@ export default function Home() {
<p>Go to <code>src/components</code> to make your awesome component!</p>
<p>Go to <code>src/styles</code> to find global styles!</p>
<Inputcommon placeholder="Enter here" onEnter={onEnter} ref={inputElementRef}/>
<Inputcommon placeholder="Enter here" onEnter={onEnter} type={InputType.number}/>
<Inputcommon placeholder="Enter here" />
<Inputcommon placeholder="Enter here" type='number' />
<Inputcommon placeholder="Enter here" value="23434" />
<ButtonCommon type='ghost' icon={<IconBuy/>}>Button</ButtonCommon>
</>
)
}