Skip to content

Commit

Permalink
adding tooltips and tests to visual refrest
Browse files Browse the repository at this point in the history
changes to tb
  • Loading branch information
dpitcock committed Sep 3, 2024
1 parent d095831 commit 3ca3174
Show file tree
Hide file tree
Showing 10 changed files with 871 additions and 107 deletions.
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions pages/app-layout/utils/drawer-ids.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
export const drawerIds = {
security: 'security',
proHelp: 'pro-help',
links: 'links',
test1: 'test-1',
test2: 'test-2',
test3: 'test-3',
test4: 'test-4',
test5: 'test-5',
test6: 'test-6',
};
20 changes: 11 additions & 9 deletions pages/app-layout/utils/drawers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import React from 'react';

import { AppLayoutProps, Drawer, SpaceBetween } from '~components';

import { drawerIds } from './drawer-ids';

import styles from '../styles.scss';

const getAriaLabels = (title: string, badge: boolean) => {
Expand Down Expand Up @@ -31,7 +33,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
{
ariaLabels: getAriaLabels('Security', false),
content: <Security />,
id: 'security',
id: drawerIds.security,
resizable: true,
onResize: (event: any) => {
// A drawer implementer may choose to listen to THEIR drawer's
Expand All @@ -48,7 +50,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
content: <Drawer header={<h2>Pro help</h2>}>Pro help.</Drawer>,
badge: true,
defaultSize: 600,
id: 'pro-help',
id: drawerIds.proHelp,
trigger: {
iconName: 'contact',
},
Expand All @@ -58,7 +60,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
resizable: true,
defaultSize: 500,
content: <Drawer header={<h2>Links</h2>}>Links.</Drawer>,
id: 'links',
id: drawerIds.links,
trigger: {
iconName: 'share',
},
Expand All @@ -67,7 +69,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
ariaLabels: getAriaLabels('Test 1', true),
content: <Drawer header={<h2>Test 1</h2>}>Test 1.</Drawer>,
badge: true,
id: 'test-1',
id: drawerIds.test1,
trigger: {
iconName: 'contact',
},
Expand All @@ -77,7 +79,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
resizable: true,
defaultSize: 500,
content: <Drawer header={<h2>Test 2</h2>}>Test 2.</Drawer>,
id: 'test-2',
id: drawerIds.test2,
trigger: {
iconName: 'share',
},
Expand All @@ -86,7 +88,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
ariaLabels: getAriaLabels('Test 3', true),
content: <Drawer header={<h2>Test 3</h2>}>Test 3.</Drawer>,
badge: true,
id: 'test-3',
id: drawerIds.test3,
trigger: {
iconName: 'contact',
},
Expand All @@ -96,7 +98,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
resizable: true,
defaultSize: 500,
content: <Drawer header={<h2>Test 4</h2>}>Test 4.</Drawer>,
id: 'test-4',
id: drawerIds.test4,
trigger: {
iconName: 'edit',
},
Expand All @@ -106,7 +108,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
resizable: true,
defaultSize: 500,
content: <Drawer header={<h2>Test 5</h2>}>Test 5.</Drawer>,
id: 'test-5',
id: drawerIds.test5,
trigger: {
iconName: 'add-plus',
},
Expand All @@ -116,7 +118,7 @@ export const drawerItems: Array<AppLayoutProps.Drawer> = [
resizable: true,
defaultSize: 500,
content: <Drawer header={<h2>Test 6</h2>}>Test 6.</Drawer>,
id: 'test-6',
id: drawerIds.test6,
trigger: {
iconName: 'call',
},
Expand Down
Loading

0 comments on commit 3ca3174

Please sign in to comment.