pixelateddesigns-showcase
v1.1.1
Published
showcase React component
Downloads
3
Readme
showcase
What is Showcase
Showcase is a react component that renders its contents in a container resembling an application window on OSX.
Why Showcase
Sometimes its nice to have a container to display something. Whether its source code, images, or markdown, things look better in a Showcase.
Example Showcase
const demoStyles = {
background: 'palevioletred',
color: 'white',
fontFamily: 'Segoe Ui, Hevetica',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: '32px',
fontWeight: 600,
};
<Showcase title='Sample title'>
<div style={demoStyles}>
Sample value to be showcased.
</div>
</Showcase>
Showcase Props
title
string
| defaults tonull
A title to display on the Showcase titlebar
height
string
| defaults tonull
Css compliant height property to set for the Showcase. If one is not passed in the Showcase will match the height of its contents.
width
string
| defaults tonull
Css compliant width property to set for the Showcase. If one is not passed in the Showcase defaults to 300px
.
onClose
function
| defaults tonull
A function to be called when the close button is clicked in the Showcase titlebar.
onMinimize
function
| defaults tonull
A function to be called when the minimize button is clicked in the Showcase titlebar.
onMaximize
function
| defaults tonull
A function to be called when the maximize button is clicked in the Showcase titlebar.
Additional exports
Additionally, the Titlebar component used in Showcase is exported and can be used on its own.
Titlebar Props
title
string
| defaults tonull
A title to display on the Titlebar.
onClose
function
| defaults tonull
A function to be called when the close button is clicked in the Titlebar.
onMinimize
function
| defaults tonull
A function to be called when the minimize button is clicked in the Titlebar.
onMaximize
function
| defaults tonull
A function to be called when the maximize button is clicked in the Titlebar.