-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from Weaverse/Stephen
Update more sections and add component button
- Loading branch information
Showing
20 changed files
with
431 additions
and
686 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type { | ||
HydrogenComponentProps, | ||
HydrogenComponentSchema, | ||
} from '@weaverse/hydrogen'; | ||
import { forwardRef, CSSProperties } from 'react'; | ||
|
||
interface ButtonItemsProps extends HydrogenComponentProps { | ||
gap: number; | ||
} | ||
|
||
let ButtonItems = forwardRef<HTMLDivElement, ButtonItemsProps>((props, ref) => { | ||
let { gap, children, ...rest } = props; | ||
let spacingStyle: CSSProperties = { | ||
gap: `${gap}px`, | ||
} as CSSProperties; | ||
return ( | ||
<div ref={ref} {...rest} className='flex mt-3' style={spacingStyle}> | ||
{children} | ||
</div> | ||
); | ||
}); | ||
|
||
export default ButtonItems; | ||
|
||
export let schema: HydrogenComponentSchema = { | ||
type: 'countdown-buttons', | ||
title: 'Buttons', | ||
inspector: [ | ||
{ | ||
group: 'Buttons', | ||
inputs: [ | ||
{ | ||
type: 'range', | ||
name: 'gap', | ||
label: 'Gap', | ||
defaultValue: 12, | ||
configs: { | ||
min: 10, | ||
max: 30, | ||
step: 1, | ||
unit: 'px', | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
childTypes: ['button'], | ||
presets: { | ||
children: [ | ||
{ | ||
type: 'button', | ||
content: 'Button', | ||
}, | ||
{ | ||
type: 'button', | ||
content: 'Button', | ||
} | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import type { | ||
HydrogenComponentProps, | ||
HydrogenComponentSchema, | ||
} from '@weaverse/hydrogen'; | ||
import { forwardRef, CSSProperties } from 'react'; | ||
|
||
interface ButtonItemsProps extends HydrogenComponentProps { | ||
gap: number; | ||
} | ||
|
||
let ButtonItems = forwardRef<HTMLDivElement, ButtonItemsProps>((props, ref) => { | ||
let { gap, children, ...rest } = props; | ||
let spacingStyle: CSSProperties = { | ||
gap: `${gap}px`, | ||
} as CSSProperties; | ||
return ( | ||
<div ref={ref} {...rest} className='flex mt-3' style={spacingStyle}> | ||
{children} | ||
</div> | ||
); | ||
}); | ||
|
||
export default ButtonItems; | ||
|
||
export let schema: HydrogenComponentSchema = { | ||
type: 'promotion-buttons', | ||
title: 'Buttons', | ||
inspector: [ | ||
{ | ||
group: 'Buttons', | ||
inputs: [ | ||
{ | ||
type: 'range', | ||
name: 'gap', | ||
label: 'Gap', | ||
defaultValue: 12, | ||
configs: { | ||
min: 10, | ||
max: 30, | ||
step: 1, | ||
unit: 'px', | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
childTypes: ['button'], | ||
presets: { | ||
children: [ | ||
{ | ||
type: 'button', | ||
content: 'Button', | ||
}, | ||
{ | ||
type: 'button', | ||
content: 'Button', | ||
} | ||
], | ||
}, | ||
}; |
Oops, something went wrong.