You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
carbon/components/WindowPointer.js

23 lines
552 B
JavaScript

import React from 'react'
export default ({ fromLeft, fromRight, color = '#fff' }) => (
<div>
<div className="window-pointer" />
<style jsx>
{`
.window-pointer {
width: 0px;
height: 0px;
border-style: solid;
border-width: 0 5px 6px 5px;
border-color: transparent transparent ${color} transparent;
position: absolute;
top: -8px;
left: ${fromLeft || 'initial'};
right: ${fromRight || 'initial'};
}
`}
</style>
</div>
)