- プロンプト実行例
- プロンプトを見る

Componentを入力してください。 コードブロックで囲むと綺麗に表示できます。

TypeScript1export type ExampleProps = { 2 message: string; 3}; 4 5const Example: FunctionComponent<ExampleProps> = ({message}) => { 6 const {isActive, setIsActive} = useState(true); 7 return ( 8 <Fragment> 9 <button onClick={() => setIsActive(!isActive)}>オンオフ</button> 10 {isActive && <p>{message}</p>} 11 </Fragment> 12 ); 13} 14 15export default Example;

TypeScript1import React, { useState } from 'react'; 2import { Story, Meta } from '@storybook/react'; 3 4import Example, { ExampleProps } from './Example'; 5 6export default { 7 component: Example, 8 title: 'Example', 9} as Meta; 10 11const Template: Story<ExampleProps> = (args) => <Example {...args} />; 12 13export const Default = Template.bind({}); 14Default.args = { 15 message: 'Hello, World!' 16};
コメント 0
他のプロンプトもチェック
GPTs
物語・脚本・プロット
テーマと文字数だけで小説を書くAIです。 プロンプトは👇 https://oshiete.ai/items/9031360447973683214399291音楽
だれでも作詞ができるプロンプトを組みました。 「suno.ai」を用いることで、あなただけの曲が作れます。 ■手順は以下 ①プロンプトを用いて作詞 ②①の内容を「suno.ai」で読み込ませる ※この際に曲調などカスタマイズするとさらにユニークな内容が作れます ■利用ツール suno.ai https://app.suno.ai/7390599