11import styled from "@emotion/styled" ;
22import { neutral , space } from "@guardian/src-foundations" ;
33import React from "react" ;
4- import { DemoFieldWrapper } from "../../editorial-source-components/DemoFieldWrapper" ;
54import { FieldLayoutVertical } from "../../editorial-source-components/FieldLayout" ;
65import {
76 actionSpacing ,
@@ -16,12 +15,10 @@ import type {
1615import { AltStyleElementWrapper } from "../../renderers/react/AltStyleElementWrapper" ;
1716import { createReactElementSpec } from "../../renderers/react/createReactElementSpec" ;
1817import { Body } from "../../renderers/react/ElementWrapper" ;
19- import { useAutoAnimate } from "../../renderers/react/useAutoAnimate" ;
2018import {
2119 LeftRepeaterActionControls ,
2220 RightRepeaterActionControls ,
2321} from "../../renderers/react/WrapperControls" ;
24- import { keyTakeawaysFields } from "./AltStyleElementSpec" ;
2522
2623export const AltStyleElementTestId = "AltStyleElement" ;
2724
@@ -81,12 +78,10 @@ export const createReactAltStylesElementSpec = <
8178 fieldDescriptions,
8279 component : ( { fields } ) => {
8380 const repeaterField = repeaterFieldExtractor ( fields ) ;
84- const [ parent ] = useAutoAnimate ( ) ;
8581 return (
8682 < FieldLayoutVertical
8783 data-cy = { AltStyleElementTestId }
8884 useAlternateStyles = { true }
89- ref = { parent }
9085 >
9186 { repeaterField . children . map ( ( child , index ) => (
9287 // Use field ID as key instead of node index to avoid React render conflicts
@@ -116,22 +111,3 @@ export const createReactAltStylesElementSpec = <
116111 } ,
117112 wrapperComponent : AltStyleElementWrapper ,
118113 } ) ;
119-
120- export const keyTakeawaysElement = createReactAltStylesElementSpec (
121- keyTakeawaysFields ,
122- ( fields ) => fields . repeater ,
123- ( repeaterChild ) => (
124- < >
125- < DemoFieldWrapper
126- field = { repeaterChild . title }
127- showHeading = { false }
128- useAlternateStyles = { true }
129- />
130- < DemoFieldWrapper
131- field = { repeaterChild . content }
132- showHeading = { false }
133- useAlternateStyles = { true }
134- />
135- </ >
136- )
137- ) ;
0 commit comments