-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated GovBanner.js to use template literals for Stylesheets, added …
…CSS for component and updated govbanner.stories.js file
- Loading branch information
1 parent
8ddfedd
commit b6d5c4c
Showing
4 changed files
with
153 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
.banner-container { | ||
width: 100%; | ||
background-color: #004445; | ||
color: white; | ||
} | ||
|
||
.banner-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 0.75rem 1rem; | ||
} | ||
|
||
.title-section { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.5rem; | ||
flex: 1; | ||
} | ||
|
||
.official-text { | ||
display: flex; | ||
gap: 0.25rem; | ||
flex-wrap: wrap; | ||
} | ||
|
||
.know-text { | ||
text-decoration: underline; | ||
} | ||
|
||
.chevron-container { | ||
background: none; | ||
border: none; | ||
padding: 0.5rem; | ||
color: inherit; | ||
cursor: pointer; | ||
} | ||
|
||
.chevron-container svg { | ||
transition: transform 0.2s ease; | ||
} | ||
|
||
.chevron-container[aria-expanded="true"] svg { | ||
transform: rotate(180deg); | ||
} | ||
|
||
.content-container { | ||
background-color: #f0f0f0; | ||
padding: 1rem; | ||
color: #333; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.banner-header { | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 0.5rem; | ||
} | ||
|
||
.title-section { | ||
flex-direction: column; | ||
align-items: flex-start; | ||
} | ||
|
||
.chevron-container { | ||
align-self: flex-end; | ||
margin-top: -2rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Only Use For Complex Styling Tasks such as looping, functions, variables, etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
import '../components/organisms/GovBanner/cod-gov-banner'; | ||
import { COMMON_STORY_ARGS } from '../../shared/js/storybook/args-utils'; | ||
import { COMMON_STORY_ARGS } from '../../shared/js/storybook/args-utils'; | ||
|
||
export default { | ||
title: 'Organisms/GovBanner', | ||
tags: ['autodocs'] | ||
}; | ||
|
||
export const Default = { | ||
render: () => ` | ||
<gov-banner> | ||
<span slot="city-name">CITY OF DETROIT</span> | ||
<span slot="official-statement">An official website of the City of Detroit.</span> | ||
<span slot="know-statement">Here's how you know.</span> | ||
<span slot="toggle-icon">▼</span> | ||
<div slot="content"> | ||
<div class="info-section"> | ||
<div class="info-item"> | ||
<div class="icon">🏛️</div> | ||
<div> | ||
<h3>Official websites use .gov</h3> | ||
<p>A .gov website belongs to an official government organization in the United States.</p> | ||
</div> | ||
</div> | ||
<div class="info-item"> | ||
<div class="icon">🔒</div> | ||
<div> | ||
<h3>Secure .gov websites use HTTPS</h3> | ||
<p>A lock or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</gov-banner> | ||
` | ||
}; |