Skip to content

Commit

Permalink
Add Yext branding to the Storybook site (#211)
Browse files Browse the repository at this point in the history
This PR makes some changes to the branding of the Storybook site to match some of the colors and styles from our components using Storybook theming. The title of the site has been updated and includes the Yext logo, and clicking on the title opens a new tab with the Github repo. The Yext logo is also displayed on the browser tab.

J=SLAP-2176
TEST=none

<img width="1295" alt="Screen Shot 2022-06-29 at 12 33 11 PM" src="https://user-images.githubusercontent.com/88398086/176489016-f6977733-0397-4243-8ded-8bfc78feb729.png">
  • Loading branch information
nmanu1 authored Jun 29, 2022
1 parent 53483c4 commit e3d1259
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .storybook/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
},
],
framework: '@storybook/react',
staticDirs: ['./public'],
webpackFinal: async (config) => {
config.resolve.alias['./AnswersCore'] = require.resolve('../tests/__fixtures__/core/AnswersCore.ts');
config.resolve.alias['../utils/location-operations'] = require.resolve('../tests/__fixtures__/utils/location-operations.ts');
Expand Down
1 change: 1 addition & 0 deletions .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<link rel="icon" href="./yextIcon.svg">
5 changes: 5 additions & 0 deletions .storybook/manager.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const { addons } = require('@storybook/addons');

addons.setConfig({
theme: require('./yextTheme.cjs')
});
Binary file added .storybook/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .storybook/public/yextIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions .storybook/yextTheme.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const { create } = require('@storybook/theming');

module.exports = create({
base: 'light',
colorPrimary: '#eeeff0',
colorSecondary: '#2563eb',

// UI
appBg: '#fafafa',
appContentBg: 'white',
appBorderColor: '#eeeff0',
appBorderRadius: 6,

// Text colors
textColor: 'black',
textMutedColor: '#4b5563',

// Toolbar colors
barTextColor: '#4b5563',
barBg: '#eeeff0',

// Form
inputBg: 'white',
inputTextColor: 'black',
inputBorder: '#9ca3af',
inputBorderRadius: 4,

// Brand logo
brandTitle: 'Yext Component Library',
brandUrl: 'https://github.com/yext/answers-react-components',
brandImage: './logo.png'
});

0 comments on commit e3d1259

Please sign in to comment.