-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Column layout text wrapping (#2524)
- Loading branch information
1 parent
e1ea6f1
commit d7217eb
Showing
3 changed files
with
82 additions
and
3 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,79 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React from 'react'; | ||
|
||
import CopyToClipboard from '~components/copy-to-clipboard'; | ||
import KeyValuePairs from '~components/key-value-pairs'; | ||
import Link from '~components/link'; | ||
import ProgressBar from '~components/progress-bar'; | ||
import StatusIndicator from '~components/status-indicator'; | ||
|
||
import ScreenshotArea from '../utils/screenshot-area'; | ||
|
||
export default function () { | ||
return ( | ||
<article> | ||
<h1>Text wrapping example</h1> | ||
<ScreenshotArea> | ||
<h2>Key-value-pairs with a long description</h2> | ||
<div style={{ maxWidth: '600px' }}> | ||
<KeyValuePairs | ||
columns={3} | ||
items={[ | ||
{ | ||
label: 'Distribution ID', | ||
value: | ||
'E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4E1WG1ZNPRXT0D4', | ||
info: ( | ||
<Link variant="info" href="#"> | ||
Info | ||
</Link> | ||
), | ||
}, | ||
{ | ||
label: 'ARN', | ||
value: ( | ||
<CopyToClipboard | ||
copyButtonAriaLabel="Copy ARN" | ||
copyErrorText="ARN failed to copy" | ||
copySuccessText="ARN copied" | ||
textToCopy="arn:service23G24::111122223333:distribution/23E1WG1ZNPRXT0D4" | ||
variant="inline" | ||
/> | ||
), | ||
}, | ||
{ | ||
label: 'Status', | ||
value: <StatusIndicator>Available</StatusIndicator>, | ||
}, | ||
{ | ||
label: 'SSL Certificate', | ||
id: 'ssl-certificate-id', | ||
value: ( | ||
<ProgressBar | ||
value={30} | ||
additionalInfo="Additional information" | ||
description="Progress bar description" | ||
ariaLabelledby="ssl-certificate-id" | ||
/> | ||
), | ||
}, | ||
{ | ||
label: 'Price class', | ||
value: 'Use only US, Canada, Europe', | ||
}, | ||
{ | ||
label: 'CNAMEs', | ||
value: ( | ||
<Link external={true} href="#"> | ||
abc.service23G24.xyz | ||
</Link> | ||
), | ||
}, | ||
]} | ||
/> | ||
</div> | ||
</ScreenshotArea> | ||
</article> | ||
); | ||
} |
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