-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sanity-plugin): add archived field
- Loading branch information
Showing
4 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
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,26 @@ | ||
import * as React from 'react' | ||
|
||
interface ArchivedInputProps { | ||
value: boolean | undefined | ||
} | ||
|
||
const pStyles = { | ||
backgroundColor: 'rgb(236, 236, 236)', | ||
padding: '10px', | ||
color: 'red' | ||
} | ||
|
||
export class ArchivedInput extends React.Component<ArchivedInputProps> { | ||
render() { | ||
const { value } = this.props | ||
if (value === true) { | ||
return ( | ||
<p style={pStyles}> | ||
This product no longer exists in Shopify. It has been archived here in | ||
Sanity for reference. | ||
</p> | ||
) | ||
} | ||
return null | ||
} | ||
} |
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