Gabarito para o passo 'Tornando o bloco countdown customizável'
// store-block/react/Countdown.tsx
import React from 'react'
interface CountdownProps {
targetDate: string
}
const Countdown: StorefrontFunctionComponent<CountdownProps> = ({
targetDate,
}) => {
return (
<div>
<h1>{targetDate}</h1>
</div>
)
}
Countdown.schema = {
title: 'editor.countdown.title',
description: 'editor.countdown.description',
type: 'object',
properties: {
targetDate: {
title: 'Data final',
description: 'Data final utilizada no contador',
type: 'string',
default: null,
},
},
}
export default Countdown
Help us make this content better!
VTEX IO courses are open source. If you see something wrong, you can open a pull request!
Make a contributionUpdated almost 4 years ago