react-code-dataset / wp-calypso /client /landing /subscriptions /components /fields /block-emails-setting /block-emails-setting.tsx
react-code-dataset / wp-calypso /client /landing /subscriptions /components /fields /block-emails-setting /block-emails-setting.tsx
Download wp-calypso/client/landing/subscriptions/components/fields/block-emails-setting/block-emails-setting.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/subscriptions/components/fields/block-emails-setting/block-emails-setting.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/landing/subscriptions/components/fields/block-emails-setting/block-emails-setting.tsx
-
curl -L -o block-emails-setting.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/subscriptions/components/fields/block-emails-setting/block-emails-setting.tsx
1.08 kB
| import { FormLabel } from '@automattic/components'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| import { ChangeEventHandler } from 'react'; | |
| import FormInputCheckbox from 'calypso/components/forms/form-checkbox'; | |
| import FormFieldset from 'calypso/components/forms/form-fieldset'; | |
| import './style.scss'; | |
| export type BlockEmailsSettingProps = { | |
| value?: boolean; | |
| onChange: ChangeEventHandler< HTMLInputElement >; | |
| }; | |
| const BlockEmailsSetting = ( { value, onChange }: BlockEmailsSettingProps ) => { | |
| const translate = useTranslate(); | |
| return ( | |
| <FormFieldset className="block-emails-setting"> | |
| <FormLabel htmlFor="blocked" className="title"> | |
| { translate( 'Pause emails' ) } | |
| </FormLabel> | |
| <FormLabel htmlFor="blocked"> | |
| <div className="input-container"> | |
| <FormInputCheckbox id="blocked" name="blocked" checked={ value } onChange={ onChange } /> | |
| </div> | |
| <span> | |
| { translate( | |
| 'Pause all email updates from sites you’re subscribed to on WordPress.com' | |
| ) } | |
| </span> | |
| </FormLabel> | |
| </FormFieldset> | |
| ); | |
| }; | |
| export default BlockEmailsSetting; | |