Skip to content

feat: Creates the banner component

Sam Beckham requested to merge 453-banner into master

This MR adds the banner component according to Pyjamas design specifications.

The title, buttonLink, buttonText, and optional illustration are handled by props. The main component <slot> will render the body of the banner. This gives us control over the main parts of the banner, but allows flexibility in the body of the message to include links, code, text modifiers, and whatever else we may need. The downside to this approach is that we will have to rely on whoever uses the component to adhere to the design guidelines themselves, but I think this is a reasonable trade-off.

There are two variants to this component promotion and introduction. This changes the styles ever-so slightly. The illustration is also optional, leading to the following four variants:

Screenshot_2019-10-30_at_10.25.24

Screenshot_2019-10-30_at_10.25.29

Screenshot_2019-10-30_at_10.25.41

Screenshot_2019-10-30_at_10.25.59

Closes #453 (closed)

Edited by Sam Beckham

Merge request reports

Loading