メインコンテンツまでスキップ

組織詳細ブロック

ViewOrganizationコンポーネントは、ReactとTypeScriptで構築された完全にカスタマイズ可能でアクセシブルな組織表示コンポーネントです。モダンなデザインパターン、柔軟なレイアウトオプション、包括的なカスタマイズ機能を備えた組織情報表示のための完全なインターフェースを提供します。


🚀 インストール

npm install @nodeblocks/frontend-view-organization-block

📖 使用方法

import {ViewOrganization} from '@nodeblocks/frontend-view-organization-block';
ライブエディター
function BasicViewOrganization() {
  return (
    <ViewOrganization
      labels={{
        companyAbout: "会社について",
        companyActivities: "事業内容", 
        companyRegisteredInformation: "登録情報"
      }}
      companyLogoUrl="/img/icon.png"
      companyName="テック・ソリューション株式会社"
      companyTags={[
        { icon: 'business', value: 'テクノロジー' },
        { icon: 'location_on', value: '東京' }
      ]}
      companyAbout="私たちは革新的なソリューションに焦点を当てた業界をリードするテクノロジー企業です。"
      companyActivities="ソフトウェア開発、コンサルティング、デジタルトランスフォーメーションサービス。"
      companyRegisteredInformation={[
        { label: '法人番号:', value: '12345678' },
        { label: '税務ID:', value: 'TAX-987654321' },
        { label: '設立年:', value: '2010年' }
      ]}
      style={{padding: '16px'}}>
      <ViewOrganization.CompanyBanner />
      <ViewOrganization.CompanyName />
      <ViewOrganization.Tags />
      <ViewOrganization.AboutCompany />
      <ViewOrganization.BusinessActivities />
      <ViewOrganization.CorporateInformation />
    </ViewOrganization>
  );
}
結果
Loading...

🔧 プロパティリファレンス

メインコンポーネントのプロパティ

プロパティデフォルト説明
labelsLabels必須異なるセクションのラベル設定
labels.companyAboutReactNodeundefined会社概要セクションのラベル
labels.companyActivitiesReactNodeundefined会社活動セクションのラベル
labels.companyRegisteredInformationReactNodeundefined登録情報セクションのラベル
companyLogoUrlstringundefined会社ロゴ画像のURL
companyNameReactNodeundefined表示する会社名
companyTagsArray<{icon: IconType, value: string}>undefinedアイコンと値を持つタグの配列
companyAboutReactNodeundefined会社概要説明コンテンツ
companyActivitiesReactNodeundefined会社活動説明コンテンツ
companyRegisteredInformationArray<{label: ReactNode, value: string}>undefined登録情報項目の配列
childrenBlocksOverrideundefinedデフォルトレンダリングをオーバーライドするカスタムブロックコンポーネント
classNamestringundefinedコンテナスタイリング用の追加CSSクラス名

注意: このコンポーネントはHTML div 要素のすべてのプロパティを継承します。

サブコンポーネント

ViewOrganizationコンポーネントは複数のサブコンポーネントを提供します。すべてのサブコンポーネントは、メインコンポーネントのコンテキストからデフォルト値を受け取り、プロパティを通じてこれらの値をオーバーライドできます。

ViewOrganization.Tag

プロパティデフォルト説明
sizeenum"S"タグのサイズ
iconenumundefinedタグに表示するアイコン
labelstringundefinedタグのテキストコンテンツ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.Title

プロパティデフォルト説明
prefixReactNodeundefinedタイトルの前に表示するコンテンツ
companyNameReactNodeコンテキストからタイトルとして表示する会社名
childrenReactNodecompanyNameタイトルコンテンツ - 提供された場合companyNameをオーバーライド
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.DescriptionDetailBlock

プロパティデフォルト説明
iconenumundefinedラベルの横に表示するアイコン
labelReactNodeundefined詳細ブロックのラベルテキスト
valueReactNodeundefined詳細ブロックの値コンテンツ
childrenReactNodeデフォルトコンテンツカスタムコンテンツ - デフォルトのラベル/値レイアウトをオーバーライド
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.CompanyBanner

プロパティデフォルト説明
companyLogoUrlstringコンテキストから会社ロゴ画像のURL
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.CompanyName

プロパティデフォルト説明
companyNameReactNodeコンテキストから表示する会社名
childrenReactNodecompanyNameタイトルコンテンツ - 提供された場合companyNameをオーバーライド
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.Tags

プロパティデフォルト説明
companyTagsArray<{icon: IconType, value: string}>コンテキストから表示するタグの配列
childrenReactNodeデフォルトタグカスタムタグコンテンツ - 提供された場合companyTagsをオーバーライド
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.AboutCompany

プロパティデフォルト説明
companyAboutReactNodeコンテキストから会社概要コンテンツ
iconenum"business"概要セクションのアイコン
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.BusinessActivities

プロパティデフォルト説明
companyActivitiesReactNodeコンテキストから会社活動コンテンツ
iconenum"sticky_note_2"活動セクションのアイコン
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

ViewOrganization.CorporateInformation

プロパティデフォルト説明
companyRegisteredInformationArray<{label: ReactNode, value: string}>コンテキストから登録情報項目の配列
iconenum"info"企業情報セクションのアイコン
directionenum"column"アクションボタンのフレックス方向
alignItemsenum"stretch"コンテナ内のアイテムの整列
gapSizeenum"S"コンテナ内のアイテム間のギャップ
classNamestringundefinedスタイリング用の追加CSSクラス名

🔧 TypeScript サポート

包括的な型定義による完全なTypeScriptサポート:

import {ViewOrganization} from '@nodeblocks/frontend-view-organization-block';
import {ReactNode} from 'react';

interface Labels {
companyAbout?: ReactNode;
companyActivities?: ReactNode;
companyRegisteredInformation?: ReactNode;
}

// コンポーネントプロパティインターフェース
interface ViewOrganizationProps {
labels: Labels;
companyLogoUrl?: string;
companyName?: ReactNode;
companyTags?: { icon: IconType; value: string }[];
companyAbout?: ReactNode;
companyActivities?: ReactNode;
companyRegisteredInformation?: { label: ReactNode; value: string }[];
className?: string;
}

const MyViewOrganization = () => {
const organizationData = {
labels: {
companyAbout: "私たちの会社について",
companyActivities: "事業内容",
companyRegisteredInformation: "法的情報"
},
companyLogoUrl: "https://example.com/logo.png",
companyName: "テック・ソリューション株式会社",
companyTags: [
{ icon: 'business' as IconType, value: 'テクノロジー' },
{ icon: 'location_on' as IconType, value: '東京' },
{ icon: 'people' as IconType, value: '従業員500名以上' }
],
companyAbout: "私たちは業界をリードするテクノロジー企業です...",
companyActivities: "ソフトウェア開発、コンサルティング...",
companyRegisteredInformation: [
{ label: '法人番号:', value: '12345678' },
{ label: '税務ID:', value: 'TAX-987654321' }
]
};

return (
<ViewOrganization {...organizationData}>
<ViewOrganization.CompanyBanner />
<ViewOrganization.CompanyName />
<ViewOrganization.Tags />
<ViewOrganization.AboutCompany />
<ViewOrganization.BusinessActivities />
<ViewOrganization.CorporateInformation />
</ViewOrganization>
);
};

React、TypeScript、モダンなウェブ標準を使用して❤️で構築されました。