How to use the react-pose.button function in react-pose

To help you get started, we’ve selected a few react-pose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github beaverbuilder / assistant / src / front / ui / components / panel-parts / index.js View on Github external
)
}

export const ScreenFooter = ( { children } ) => {
	const classes = classname( {
		'fl-asst-screen-footer': true,
	} )
	return (
		<div>
			<div>{children}</div>
		</div>
	)
}

const MoreButton = posed.button( {
	hoverable: true,
	focusable: true,
	pressable: true,
} )
const MoreButtonPath = posed.polyline( {
	init: {
		points: '2,4 25,4 48,4',
	},
	hover: {
		points: ( { isExpanded } ) =&gt; isExpanded ? '5,6 25,2 45,6' : '5,2 25,6 45,2',
	},
	press: {
		points: ( { isExpanded } ) =&gt; isExpanded ? '5,6 25,2 45,6' : '5,2 25,6 45,2',
	},
} )
github rdrnt / tps-calls / src / components / MapOverlayButton / index.tsx View on Github external
left?: number;
  right?: number;
  bottom?: number;
}

interface MapOverlayButton {
  onClick: () =&gt; void;
  position: CssPosition;
  iconName: IconNames;
  color?: string;
  hoverColor?: string;
  size?: number;
  hidden: boolean;
}

const AnimatedContainer = posed.button({
  enter: {
    opacity: 1,
  },
  exit: {
    opacity: 0,
  },
});

const Container = styled(AnimatedContainer)&lt;{
  position: CssPosition;
}&gt;`
  position: absolute;
  ${props =&gt; props.position.top &amp;&amp; `top: ${props.position.top}px`};
  ${props =&gt; props.position.bottom &amp;&amp; `bottom: ${props.position.bottom}px`};
  ${props =&gt; props.position.left &amp;&amp; `left: ${props.position.left}px`};
  ${props =&gt; props.position.right &amp;&amp; `right: ${props.position.right}px`};
github beaverbuilder / assistant / src / original-ui / ui / components / panel-parts / index.js View on Github external
)
}

export const ScreenFooter = ( { children } ) =&gt; {
	const classes = classname( {
		'fl-asst-screen-footer': true,
	} )
	return (
		<div>
			<div>{children}</div>
		</div>
	)
}

const MoreButton = posed.button( {
	hoverable: true,
	focusable: true,
	pressable: true,
} )
const MoreButtonPath = posed.polyline( {
	init: {
		points: '2,4 25,4 48,4',
	},
	hover: {
		points: ( { isExpanded } ) =&gt; isExpanded ? '5,6 25,2 45,6' : '5,2 25,6 45,2',
	},
	press: {
		points: ( { isExpanded } ) =&gt; isExpanded ? '5,6 25,2 45,6' : '5,2 25,6 45,2',
	},
} )