Skip to content

Commit 6949f4e

Browse files
serifluousPixeledCodekodiakhq[bot]
authored
chore(website): update code editor library with editable code block info (#4290)
* chore(website): update code editor library with editable code block info * chore: align max width values * chore: add Anchor import to code editor library page * chore(website): add marginY for callout --------- Co-authored-by: PixeledCode <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent c7734a3 commit 6949f4e

File tree

2 files changed

+14
-7
lines changed
  • packages/paste-website/src/pages

2 files changed

+14
-7
lines changed

packages/paste-website/src/pages/core/libraries/code-editor/index.mdx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import packageJson from '@twilio-paste/code-editor-library/package.json';
1111
import {SidebarCategoryRoutes} from '../../../../constants';
1212
import {getNavigationData} from '../../../../utils/api';
1313
import DefaultLayout from '../../../../layouts/DefaultLayout';
14+
import {Anchor} from '@twilio-paste/anchor';
15+
import {Callout, CalloutHeading, CalloutText} from '@twilio-paste/callout';
1416

1517
export default DefaultLayout;
1618

@@ -43,14 +45,19 @@ export const getStaticProps = async () => {
4345

4446
## About
4547

46-
The Code Editor allows for a full code-editing experiences on the web, including syntax highlighting and displaying line numbers.
48+
The Code Editor library is the code editor that powers the stylized [Editable Code Block](/components/editable-code-block) component. It allows for full code-editing functionality on the web, including syntax highlighting and displaying line numbers.
4749

4850
This library is built on top of [monaco-react](https://github.com/suren-atoyan/monaco-react), which wraps the
49-
[Monaco Editor](https://github.com/microsoft/monaco-editor).
50-
51-
Our library exposes a theme for use in Twilio products, aptly called the `PasteTheme`. This theme is based on the
51+
[Monaco Editor](https://github.com/microsoft/monaco-editor). The library exposes a theme for use in Twilio products, aptly called the `PasteTheme`. This theme is based on the
5252
[Night Owl theme by Sarah Drasner](https://marketplace.visualstudio.com/items?itemName=sdras.night-owl&WT.mc_id=github-theme-sdras).
5353

54+
<Callout variant='neutral' marginY="space70">
55+
<CalloutHeading as="h3">Are you looking for stylized UI components?</CalloutHeading>
56+
<CalloutText>
57+
For fully styled components, use the <Anchor href="https://paste.twilio.design/components/editable-code-block">Editable Code Block</Anchor>. Or if you don't need editing functionality, use the <Anchor href="https://paste.twilio.design/components/code-block">Code Block</Anchor>.
58+
</CalloutText>
59+
</Callout>
60+
5461
### Installation
5562

5663
```bash
@@ -105,7 +112,7 @@ const PasteThemeEditor = (): React.ReactNode => {
105112

106113
---
107114

108-
See more examples on our [Storybook](https://paste-storybook.twilio.design/?path=/story/libraries-code-editor-editor--).
115+
See more examples on our [Storybook](https://paste-storybook.twilio.design/?path=/story/libraries-code-editor-editor--javascript-editor).
109116

110117
</content>
111118

packages/paste-website/src/pages/foundations/spacing-and-layout/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Horizontal spacing is very similar to vertical space, using 8-pixel multiples. R
158158

159159
## Max widths
160160

161-
We suggest a max width of 1440px for the content area (not including margins).
161+
We suggest a max width of 1232px or `size-120` for the content area (not including margins).
162162

163163
<Callout variant="neutral" marginY="space70">
164164
<CalloutHeading as="h5">What responsive breakpoints do I use for my feature?</CalloutHeading>
@@ -171,7 +171,7 @@ We suggest a max width of 1440px for the content area (not including margins).
171171

172172
#### Text widths
173173

174-
Your text width should not be as long as your max width (1140px). In fact, a good rule of thumb for your text widths is no more than 65 characters per line. For Twilio default body text, we aim for about 712 pixels (`size-70`) for text width.
174+
Your text width should not be as long as your max width (1232px or `size-120`). In fact, a good rule of thumb for your text widths is no more than 65 characters per line. For Twilio default body text, we aim for about 712 pixels (`size-70`) for text width.
175175

176176
It's sometimes helpful to also break up content by pairing it with a hero image. By doing this, you're visually signaling that this is an effortless conversation.
177177

0 commit comments

Comments
 (0)