Skip to content

Commit

Permalink
Merge pull request #35 from brown-ccv/fix-nav
Browse files Browse the repository at this point in the history
Fix nav
  • Loading branch information
fernandogelin committed Sep 23, 2020
2 parents 5190333 + e1c652b commit 43b990a
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"deploy": "firebase deploy"
},
"dependencies": {
"@brown-ccv/disco-styles": "2.2.0",
"@brown-ccv/disco-styles": "2.2.1",
"@fortawesome/free-brands-svg-icons": "^5.14.0",
"@fortawesome/vue-fontawesome": "2",
"bulma": "^0.9.0",
Expand Down
1 change: 1 addition & 0 deletions src/components/d-hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<h2 data-testid="subtitle" class="d-subtitle">
{{ subtitle }}
</h2>
<slot name="button"></slot>
</div>
</div>
</section>
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ export { default as DBanner } from './d-banner.vue';
export { default as DNavbar } from './d-navbar.vue';
export { default as DPersonCard } from './d-person-card.vue';
export { default as DFooter } from './d-footer.vue';
export { default as DCard } from './d-card.vue';
export { default as DModal } from './d-modal.vue';

export { default as discoBaseMixin } from '../mixins/disco-base-mixin.js';
2 changes: 1 addition & 1 deletion src/stories/footer.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const Template = (args, { argTypes }) => ({
});

<Canvas >
<Story name='Footer' args={{variant: 'white'}}>
<Story name='Footer' args={{variant: 'light'}}>
{Template.bind({})}
</Story>
</Canvas>
15 changes: 11 additions & 4 deletions src/stories/hero.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Meta, ArgsTable, Story, Canvas } from '@storybook/addon-docs/blocks';
import DHero from '../components/d-hero.vue';
import DButton from '../components/d-button.vue';

import { COLOR_VARIANTS } from '../utils';

<Meta
title='Elements/Hero'
component={DHero}
argTypes={{
variant: { control: { type: 'select', options: COLOR_VARIANTS } }
variant: { control: { type: 'select', options: COLOR_VARIANTS } },
accent: { control: { type: 'select', options: COLOR_VARIANTS } }
}}
/>

Expand All @@ -21,12 +24,16 @@ import { COLOR_VARIANTS } from '../utils';

export const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { DHero },
template: `<DHero :title='title' :subtitle='subtitle' :variant='variant' :fullHeight="fullHeight"/>`
components: { DHero, DButton },
template: `<DHero :title='title' :subtitle='subtitle' :variant='variant' :fullHeight="fullHeight">
<template #button>
<DButton :variant='accent' name="Learn about CCV's services" />
</template>
`
});

<Canvas >
<Story name='Hero' args={{variant: 'success', title: 'Disco Design System', subtitle: 'Powering CCV\'s Web Apps', fullHeight: false}}>
<Story name='Hero' args={{variant: 'warning', accent: 'success', title: 'Disco Design System', subtitle: 'Powering CCV\'s Web Apps', fullHeight: false}}>
{Template.bind({})}
</Story>
</Canvas>
37 changes: 23 additions & 14 deletions src/stories/navbar.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
import { Meta, Props, Story, Preview } from '@storybook/addon-docs/blocks';
import { Meta, ArgsTable, Story, Canvas } from '@storybook/addon-docs/blocks';
import DNavbar from '../components/d-navbar.vue';
import DButton from '../components/d-button.vue';
import CCVLogo from '../components/logos/CCVLogo.vue'
import BrownLogo from '../components/logos/BrownLogo.vue'

<Meta title="Elements/Navigation Bar" component={DNavbar} />
import { COLOR_VARIANTS } from '../utils';

<Meta title="Elements/Navigation Bar"
component={DNavbar}
argTypes={{
variant: { control: { type: 'select', options: COLOR_VARIANTS } }
}}
/>

# Table of Contents

<Props of={DNavbar} />
<ArgsTable story="Navbar" />

# DNavbar component
```jsx
<DNavbar />
```

<Preview >
<Story name="Navigation Bar">
{{
components: {DNavbar, CCVLogo, BrownLogo, DButton},
template: `
<DNavbar>
export const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { DNavbar, CCVLogo, BrownLogo, DButton },
template: `<DNavbar :variant="variant">
<template v-slot:brand>
<a class="navbar-item" href="#" aria-label="Back to Home">
<BrownLogo class="d-nav-brand" size="m" />
Expand Down Expand Up @@ -118,12 +123,16 @@ import BrownLogo from '../components/logos/BrownLogo.vue'
</li>
</template>
</DNavbar>
`
}}
`
});

<Canvas>
<Story name="Navigation Bar" args={{variant: 'light'}}>
{Template.bind({})}
</Story>
</Preview>
</Canvas>

<Preview >
<Canvas>
<Story name="Navigation Bar Simple">
{{
components: {DNavbar, CCVLogo, BrownLogo, DButton},
Expand All @@ -132,4 +141,4 @@ import BrownLogo from '../components/logos/BrownLogo.vue'
`
}}
</Story>
</Preview>
</Canvas>
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,10 @@
resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz#860ce718b0b73f4009e153541faff2cb6b85d047"
integrity sha512-4Th98KlMHr5+JkxfcoDT//6vY8vM+iSPrLNpHhRyLx2CFYi8e2RfqPLdpbnpo0Q5lQC5hNB79yes07zb02fvCw==

"@brown-ccv/[email protected].0":
version "2.2.0"
resolved "https://npm.pkg.github.com/download/@brown-ccv/disco-styles/2.2.0/306d87690530f63cc1d420b00b1da3294ecf3952963dde2999068b20b813b128#14bf0d5154b33bd28d7c2fe8563f13f05c68c623"
integrity sha512-ooTtx84vCoxlj8IKod3ZSKXU4ryw4I6bpnRjZCv1BNJlZ3PonkdOw0jUiA/HUK+KKXufFm4KSNBxHn3rnCjp5Q==
"@brown-ccv/[email protected].1":
version "2.2.1"
resolved "https://npm.pkg.github.com/download/@brown-ccv/disco-styles/2.2.1/d26719417a7d6f6d95576784cfd5e7d5d577eb33fc7ffdcafe738cb4e11f3d92#82b4ccdd6ef8c113f9ac94b6e615386139edfd6d"
integrity sha512-IGOIOckk/3zyHCQgRDTTpg5v34Ze1nmjmuNfX8umadw5jNiptiQJ6wYOM0S+pI/yAciLPbuLiUKz9tDrZTKjWg==
dependencies:
bulma "^0.9.0"
cz-conventional-changelog "^3.2.0"
Expand Down

0 comments on commit 43b990a

Please sign in to comment.