Skip to content

Commit

Permalink
Use SiteAlert component from uswds
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Jul 2, 2024
1 parent fcd9f64 commit 6c600bd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/scripts/components/common/announcement/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@use "usa-alert";
17 changes: 17 additions & 0 deletions app/scripts/components/common/announcement/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import { SiteAlert } from "@trussworks/react-uswds";
import './index.scss';

export default function Announcement() {
return <SiteAlert slim variant='emergency'>Alert</SiteAlert>;
}

// return (<div className='usa-alert usa-alert--info usa-alert--no-icon'>
// <div className='usa-alert__body'>
// <p className='usa-alert__text'>
// Lorem ipsum dolor sit amet,
// <a className='usa-link' >consectetur adipiscing</a>
// elit, sed do eiusmod.
// </p>
// </div>
// </div>);
3 changes: 2 additions & 1 deletion app/scripts/components/common/layout-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import React, {
import { useDeepCompareEffect } from 'use-deep-compare';
import styled from 'styled-components';
import { Outlet } from 'react-router';

import { reveal } from '@devseed-ui/animation';
import Announcement from './announcement';

import MetaTags from './meta-tags';
import PageFooter from './page-footer';
Expand Down Expand Up @@ -57,6 +57,7 @@ function LayoutRoot(props: { children?: ReactNode }) {
description={description || appDescription}
thumbnail={thumbnail}
/>
<Announcement />
<NavWrapper />
<PageBody id={PAGE_BODY_ID} tabIndex={-1}>
<Outlet />
Expand Down

0 comments on commit 6c600bd

Please sign in to comment.