Skip to content

Commit

Permalink
chore: small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shleewhite committed Aug 29, 2022
1 parent aec5a9a commit 11c6704
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const CodeBlockGroupTab = React.forwardRef<HTMLButtonElement, {element: B
_selected_focus={{borderColor: 'transparent'}}
_selected_hover={{
backgroundColor: 'colorBackgroundPrimaryStronger',
color: 'colorTextInverse',
color: 'colorTextWeakest',
borderColor: 'transparent',
}}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import type {Story} from '@storybook/react';
import {CodeBlock, CodeBlockGroup} from '../src';
import {Box} from '@twilio-paste/box';

// eslint-disable-next-line import/no-default-export
export default {
Expand Down Expand Up @@ -58,8 +59,9 @@ foreground '#CCCCFF'
);

export const CodeBlockWithNoLineWrap: Story = () => (
<CodeBlock label="Build a button" showLineNumbers language="ruby">
{`#!/usr/bin/ruby
<Box maxWidth="size40">
<CodeBlock label="Build a button" showLineNumbers language="ruby">
{`#!/usr/bin/ruby
# Import the library. This is a really really really really really really really really really really really really long line that should be wrapped.
require 'tk'
Expand All @@ -76,12 +78,14 @@ lab = TkLabel.new(root) {
background '#3333AA'
foreground '#CCCCFF'
}`}
</CodeBlock>
</CodeBlock>
</Box>
);

export const CodeBlockWithLineWrap: Story = () => (
<CodeBlock label="Build a button" showLineNumbers language="ruby" wrapLines>
{`#!/usr/bin/ruby
<Box maxWidth="size40">
<CodeBlock label="Build a button" showLineNumbers language="ruby" wrapLines>
{`#!/usr/bin/ruby
# Import the library. This is a really really really really really really really really really really really really long line that should be wrapped.
require 'tk'
Expand All @@ -98,7 +102,8 @@ lab = TkLabel.new(root) {
background '#3333AA'
foreground '#CCCCFF'
}`}
</CodeBlock>
</CodeBlock>
</Box>
);

export const CodeBlockWithLineNumbers: Story = () => (
Expand Down

0 comments on commit 11c6704

Please sign in to comment.