File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
packages/paste-core/components/inline-code Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @twilio-paste/inline-code " : patch
3+ " @twilio-paste/core " : patch
4+ ---
5+
6+ [ Inline Code] : Update children prop to accept ` React.ReactNode ` instead of ` string `
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import * as React from "react";
1010type InlineCodeVariants = "default" | "minimal" ;
1111
1212export interface InlineCodeProps extends Partial < Omit < HTMLPasteProps < "div" > , "children" > > {
13- children : string ;
13+ children : React . ReactNode ;
1414 /**
1515 * Overrides the default element name to apply unique styles with the Customization Provider.
1616 *
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { Heading } from "@twilio-paste/heading";
55import { Stack } from "@twilio-paste/stack" ;
66import { Text } from "@twilio-paste/text" ;
77import { useTheme } from "@twilio-paste/theme" ;
8+ import { Truncate } from "@twilio-paste/truncate" ;
89import * as React from "react" ;
910
1011import { InlineCode } from "../src" ;
@@ -94,6 +95,16 @@ export const DisplayingAPIKey: StoryFn = () => {
9495 ) ;
9596} ;
9697
98+ export const WithTruncate : StoryFn = ( ) => {
99+ return (
100+ < Box maxWidth = "size20" >
101+ < InlineCode >
102+ < Truncate title = "Some very long text to truncate" > Some very long text to truncate</ Truncate >
103+ </ InlineCode >
104+ </ Box >
105+ ) ;
106+ } ;
107+
97108export const Customization : StoryFn = ( _args , { parameters : { isTestEnvironment } } ) => {
98109 const currentTheme = useTheme ( ) ;
99110 return (
You can’t perform that action at this time.
0 commit comments