1.1.1 • Published 6 years ago

pixelateddesigns-showcase v1.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

showcase

npm

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 to null

A title to display on the Showcase titlebar

height

string | defaults to null

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 to null

Css compliant width property to set for the Showcase. If one is not passed in the Showcase defaults to 300px.

onClose

function | defaults to null

A function to be called when the close button is clicked in the Showcase titlebar.

onMinimize

function | defaults to null

A function to be called when the minimize button is clicked in the Showcase titlebar.

onMaximize

function | defaults to null

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 to null

A title to display on the Titlebar.

onClose

function | defaults to null

A function to be called when the close button is clicked in the Titlebar.

onMinimize

function | defaults to null

A function to be called when the minimize button is clicked in the Titlebar.

onMaximize

function | defaults to null

A function to be called when the maximize button is clicked in the Titlebar.

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago