-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 自定义icons * feat: legendicon icon名称调整 --------- Co-authored-by: shengzheng <[email protected]>
- Loading branch information
Showing
5 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { LegendIcon } from '@antv/larkmap'; | ||
import React from 'react'; | ||
|
||
export default () => { | ||
return ( | ||
<div> | ||
<LegendIcon | ||
labels={['枫叶图标', '火车图标', '小汽车图标']} | ||
icons={[ | ||
<img src="https://gw.alipayobjects.com/mdn/rms_5e897d/afts/img/A*6ONoRKNECC0AAAAAAAAAAAAAARQnAQ" />, | ||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/e21321e0-8f4a-474f-a0ee-2176492bb824.svg" />, | ||
<img src="https://gw.alipayobjects.com/zos/bmw-prod/7fb22e05-4488-4597-8e33-fc03716d2b0a.svg" />, | ||
]} | ||
/> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import type { CommonProps } from '../../../types/common'; | ||
|
||
export type IconType = string | React.ReactElement; | ||
|
||
export interface LegendIconProps extends CommonProps { | ||
/** 图例项名称 */ | ||
labels: string[]; | ||
/** 图例项图标 */ | ||
icons: string[]; | ||
icons: IconType[]; | ||
} |