Hello,
I haven't worked with office UI or react but Somehow managed to create a button, but it's aligned to left, I need it to be right-aligned.
Below is the react code.
render() {
var emojiIcon: IIconProps = { iconName: 'DoubleChevronRight', };
emojiIcon.style={float:'right',color:'#000000'};
return (
<IconButton iconProps={emojiIcon} title="Next" ariaLabel="Next"onClick={(e) => {
this.props.onChange(true)
}} />
);
}
No CSS files used, Can someone advise, please?
Many Thanks.
Nijo
Hi Danz,
Thank you for your input, I was getting the following error when trying to add align property to a div.
return (
<div id="child" style={{ display: "flex", justifyContent: "flex-end" }}>
<IconButton iconProps={emojiIcon} title="Next" ariaLabel="Next"onClick={(e) => {
this.props.onChange(true)
}} />
</div>
);
Many Thanks again for the input.
Nijo
You can use div and wrap your IconButton and have div align contents right. Code snippet below.
return (
<div align="right">
<IconButton iconProps={emojiIcon} title="Next" ariaLabel="Next"onClick={(e) => { this.props.onChange(true) }} />
</div>
);
Hope that helps.
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72