import { Path, SVG } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import type { BlockVariation } from '@wordpress/blocks';
import type { ColumnsAttributes } from './types';
/**
* Template option choices for predefined columns layouts.
*/
const variations: BlockVariation< ColumnsAttributes >[] = [
{
name: 'one-column-full',
title: __( '100' ),
description: __( 'One column' ),
icon: (
),
innerBlocks: [ [ 'core/column' ] ],
scope: [ 'block' ],
},
{
name: 'two-columns-equal',
title: __( '50 / 50' ),
description: __( 'Two columns; equal split' ),
icon: (
),
isDefault: true,
innerBlocks: [ [ 'core/column' ], [ 'core/column' ] ],
scope: [ 'block' ],
},
{
name: 'two-columns-one-third-two-thirds',
title: __( '33 / 66' ),
description: __( 'Two columns; one-third, two-thirds split' ),
icon: (
),
innerBlocks: [
[ 'core/column', { width: '33.33%' } ],
[ 'core/column', { width: '66.66%' } ],
],
scope: [ 'block' ],
},
{
name: 'two-columns-two-thirds-one-third',
title: __( '66 / 33' ),
description: __( 'Two columns; two-thirds, one-third split' ),
icon: (
),
innerBlocks: [
[ 'core/column', { width: '66.66%' } ],
[ 'core/column', { width: '33.33%' } ],
],
scope: [ 'block' ],
},
{
name: 'three-columns-equal',
title: __( '33 / 33 / 33' ),
description: __( 'Three columns; equal split' ),
icon: (
),
innerBlocks: [
[ 'core/column' ],
[ 'core/column' ],
[ 'core/column' ],
],
scope: [ 'block' ],
},
{
name: 'three-columns-wider-center',
title: __( '25 / 50 / 25' ),
description: __( 'Three columns; wide center column' ),
icon: (
),
innerBlocks: [
[ 'core/column', { width: '25%' } ],
[ 'core/column', { width: '50%' } ],
[ 'core/column', { width: '25%' } ],
],
scope: [ 'block' ],
},
];
export default variations;