reactive-bulma 2.16.0 → 2.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { MediaProps } from '../../../interfaces/moleculeProps';
3
+ declare const Media: React.FC<MediaProps>;
4
+ export default Media;
@@ -15,3 +15,4 @@ export { default as PanelTabs } from './PanelTabs';
15
15
  export { default as LevelItem } from '../molecules/LevelItem';
16
16
  export { default as TileBox } from './TileBox';
17
17
  export { default as Footer } from './Footer';
18
+ export { default as Media } from './Media';
@@ -181,4 +181,12 @@ export interface FooterProps extends ComposedElementProps {
181
181
  /** `Styling` Centers footer¿s content horizontally */
182
182
  isContentCentered?: boolean;
183
183
  }
184
+ export interface MediaProps extends ElementProps {
185
+ /** `Attribute` Reffers to the component or string content that will be shown inside the component's left side */
186
+ leftContent?: SingleChildType;
187
+ /** `Attribute` Reffers to the component or string content that will be shown inside the component's center */
188
+ centerContent?: SingleChildType;
189
+ /** `Attribute` Reffers to the component or string content that will be shown inside the component's right side */
190
+ rightContent?: SingleChildType;
191
+ }
184
192
  export {};
@@ -11,3 +11,4 @@ export declare enum IconSizeEnum {
11
11
  'is-large' = 48
12
12
  }
13
13
  export type TileContextType = 'is-child' | 'is-parent' | 'is-ancestor';
14
+ export type MediaSectionType = 'left' | 'content' | 'right';
package/dist/esm/index.js CHANGED
@@ -3717,6 +3717,16 @@ const Footer = ({ testId = null, containerTestId = null, cssClasses = null, cont
3717
3717
  React.createElement("section", { "data-testid": footerContentTestId, className: footerContentClasses, style: style !== null && style !== void 0 ? style : undefined }, content)));
3718
3718
  };
3719
3719
 
3720
+ const renderMediaSection = (content, position, testId) => content ? (React.createElement("section", { "data-testid": `${testId}-${position}`, className: `media-${position}` }, content)) : null;
3721
+ const Media = ({ testId = null, cssClasses = null, style = null, leftContent = null, centerContent = null, rightContent = null }) => {
3722
+ const mediaClasses = parseClasses(['media', cssClasses]);
3723
+ const mediaTestId = testId !== null && testId !== void 0 ? testId : parseTestId({ tag: 'media', parsedClasses: mediaClasses });
3724
+ return (React.createElement("article", { "data-testid": mediaTestId, className: mediaClasses, style: style !== null && style !== void 0 ? style : undefined },
3725
+ renderMediaSection(leftContent, 'left', mediaTestId),
3726
+ renderMediaSection(centerContent, 'content', mediaTestId),
3727
+ renderMediaSection(rightContent, 'right', mediaTestId)));
3728
+ };
3729
+
3720
3730
  const renderFieldLabel = (labelText) => labelText ? (React.createElement("label", { "data-testid": 'test-form-field-label', className: 'label' }, labelText)) : null;
3721
3731
  const renderFieldBody = (inputControlConfig, isGrouped) => {
3722
3732
  if (isGrouped) {
@@ -3818,5 +3828,5 @@ const TileGroup = ({ testId = null, cssClasses = null, style = null, context = '
3818
3828
  return (React.createElement(Tile, { testId: tileBoxTestId, cssClasses: cssClasses !== null && cssClasses !== void 0 ? cssClasses : undefined, style: style !== null && style !== void 0 ? style : undefined, context: context, size: size !== null && size !== void 0 ? size : undefined, isVertical: isVertical }, groupConfig.map(tileConfig => (React.createElement(Tile, Object.assign({ key: `tile-item-${generateKey()}` }, tileConfig))))));
3819
3829
  };
3820
3830
 
3821
- export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Footer, FormField, Hero, Icon, Image, Input, InputControl, Level, LevelHeader, LevelItem, Menu, MenuItem, MenuList, Message, Modal, Notification, Pagination, PaginationItem, Panel, PanelBlock, PanelTabs, ProgressBar, RadioButton, Select, TabItem, Tabs, Tag, TextArea, Tile, TileBox, TileGroup, Title };
3831
+ export { Block, Box, BreadcrumbItem, Breadcrumbs, Button, ButtonGroup, CheckBox as Checkbox, Column, ColumnGroup, Delete, Dropdown, DropdownItem, DropdownTrigger, File, Footer, FormField, Hero, Icon, Image, Input, InputControl, Level, LevelHeader, LevelItem, Media, Menu, MenuItem, MenuList, Message, Modal, Notification, Pagination, PaginationItem, Panel, PanelBlock, PanelTabs, ProgressBar, RadioButton, Select, TabItem, Tabs, Tag, TextArea, Tile, TileBox, TileGroup, Title };
3822
3832
  //# sourceMappingURL=index.js.map